3.4.76 \(\int \cot (e+f x) (b \csc (e+f x))^m \, dx\) [376]

Optimal. Leaf size=18 \[ -\frac {(b \csc (e+f x))^m}{f m} \]

[Out]

-(b*csc(f*x+e))^m/f/m

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2686, 32} \begin {gather*} -\frac {(b \csc (e+f x))^m}{f m} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]*(b*Csc[e + f*x])^m,x]

[Out]

-((b*Csc[e + f*x])^m/(f*m))

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 2686

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rubi steps

\begin {align*} \int \cot (e+f x) (b \csc (e+f x))^m \, dx &=-\frac {b \text {Subst}\left (\int (b x)^{-1+m} \, dx,x,\csc (e+f x)\right )}{f}\\ &=-\frac {(b \csc (e+f x))^m}{f m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 18, normalized size = 1.00 \begin {gather*} -\frac {(b \csc (e+f x))^m}{f m} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]*(b*Csc[e + f*x])^m,x]

[Out]

-((b*Csc[e + f*x])^m/(f*m))

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 19, normalized size = 1.06

method result size
derivativedivides \(-\frac {\left (b \csc \left (f x +e \right )\right )^{m}}{f m}\) \(19\)
default \(-\frac {\left (b \csc \left (f x +e \right )\right )^{m}}{f m}\) \(19\)
risch \(-\frac {{\mathrm e}^{\frac {m \left (-i \pi \,\mathrm {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right ) \mathrm {csgn}\left (\frac {b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )-i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{3}+i \pi \,\mathrm {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right ) \mathrm {csgn}\left (\frac {b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{2}+i \pi \mathrm {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{2} \mathrm {csgn}\left (i b \right )+i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right ) \mathrm {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{2}-i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right ) \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )-i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right ) \mathrm {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right ) \mathrm {csgn}\left (i b \right )+i \pi \mathrm {csgn}\left (\frac {b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{3}-i \pi \mathrm {csgn}\left (\frac {b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{2}+i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{2} \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )+i \pi +i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{i \left (f x +e \right )}\right )-i \pi \mathrm {csgn}\left (\frac {i b \,{\mathrm e}^{i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}-1}\right )^{3}+2 \ln \left (2\right )+2 \ln \left (b \right )+2 \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )-2 \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )\right )}{2}}}{f m}\) \(606\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)*(b*csc(f*x+e))^m,x,method=_RETURNVERBOSE)

[Out]

-(b*csc(f*x+e))^m/f/m

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 22, normalized size = 1.22 \begin {gather*} -\frac {b^{m} \sin \left (f x + e\right )^{-m}}{f m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)*(b*csc(f*x+e))^m,x, algorithm="maxima")

[Out]

-b^m*sin(f*x + e)^(-m)/(f*m)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 21, normalized size = 1.17 \begin {gather*} -\frac {\left (\frac {b}{\sin \left (f x + e\right )}\right )^{m}}{f m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)*(b*csc(f*x+e))^m,x, algorithm="fricas")

[Out]

-(b/sin(f*x + e))^m/(f*m)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (14) = 28\).
time = 0.14, size = 54, normalized size = 3.00 \begin {gather*} \begin {cases} x \cot {\left (e \right )} & \text {for}\: f = 0 \wedge m = 0 \\x \left (b \csc {\left (e \right )}\right )^{m} \cot {\left (e \right )} & \text {for}\: f = 0 \\- \frac {\log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {\log {\left (\tan {\left (e + f x \right )} \right )}}{f} & \text {for}\: m = 0 \\- \frac {\left (b \csc {\left (e + f x \right )}\right )^{m}}{f m} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)*(b*csc(f*x+e))**m,x)

[Out]

Piecewise((x*cot(e), Eq(f, 0) & Eq(m, 0)), (x*(b*csc(e))**m*cot(e), Eq(f, 0)), (-log(tan(e + f*x)**2 + 1)/(2*f
) + log(tan(e + f*x))/f, Eq(m, 0)), (-(b*csc(e + f*x))**m/(f*m), True))

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 21, normalized size = 1.17 \begin {gather*} -\frac {\left (\frac {b}{\sin \left (f x + e\right )}\right )^{m}}{f m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)*(b*csc(f*x+e))^m,x, algorithm="giac")

[Out]

-(b/sin(f*x + e))^m/(f*m)

________________________________________________________________________________________

Mupad [B]
time = 2.84, size = 43, normalized size = 2.39 \begin {gather*} \left \{\begin {array}{cl} -\frac {\ln \left (\frac {b}{\sin \left (e+f\,x\right )}\right )}{f} & \text {\ if\ \ }m=0\\ -\frac {{\left (\frac {b}{\sin \left (e+f\,x\right )}\right )}^m}{f\,m} & \text {\ if\ \ }m\neq 0 \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)*(b/sin(e + f*x))^m,x)

[Out]

piecewise(m == 0, -log(b/sin(e + f*x))/f, m ~= 0, -(b/sin(e + f*x))^m/(f*m))

________________________________________________________________________________________